<?php

use Illuminate\Routing\Router;


Route::group([
	'prefix' => 'admin/decorationtask',
	'namespace' => 'Frieza\\Modules\\Decorationtask\\Controllers',
	'middleware' => [
		'web',
		'admin'
	],
], function (Router $router) {

    //分组列表
    $router->get('/taskgroup/{step}', 'TaskGroupController@index');
    //添加分组页面
    $router->get('/taskgroup/{step}/create', 'TaskGroupController@edit');
    //添加分组提交
    $router->post('/taskgroup/editSubmit', 'TaskGroupController@editSubmit');
    //修改分组页面
    $router->get('/taskgroup/{step}/{id}/edit', 'TaskGroupController@edit');
    //添加、修改分组提交
    $router->post('/taskgroup/save', 'TaskGroupController@editSubmit');
    //删除分组
    $router->delete('/taskgroup/{step}/{id}', 'TaskGroupController@del');
    //分组排序
    $router->post('/taskgroup/sort', 'TaskGroupController@sort');

    //任务列表
    $router->get('/admintask/{step}', 'AdminTaskController@index');
    //任务添加页面
    $router->get('/admintask/{step}/create', 'AdminTaskController@edit');
    //修改任务页面
    $router->get('/admintask/{step}/{id}/edit', 'AdminTaskController@edit');
    //添加、修改任务提交
    $router->post('/admintask/save', 'AdminTaskController@editSubmit');
    //删除任务
    $router->delete('/admintask/{step}/{id}', 'AdminTaskController@del');
    //发布新版本
    $router->get('/admintask/publish/publish', 'AdminTaskController@publish');
    //任务排序
    $router->post('/admintask/sort', 'AdminTaskController@sort');


    //任务推荐信息相关
    $router->get('/admintask/reclist/{id}', 'AdminTaskController@recList');
    //推荐信息添加页面
    $router->get('/admintask/reclist/{task_id}/create', 'AdminTaskController@recEdit');
    //修改推荐信息页面
    $router->get('/admintask/reclist/{task_id}/{id}/edit', 'AdminTaskController@recEdit');
    //添加、修改推荐信息提交
    $router->post('/admintask/reclist/save', 'AdminTaskController@recEditSubmit');
    //删除推荐信息
    $router->delete('/admintask/reclist/{task_id}/{id}', 'AdminTaskController@recDel');
    //任务推荐信息排序
    $router->post('/admintask/reclist/sort', 'AdminTaskController@recSort');


    //预算提示信息
    $router->get('/budget_prompt', 'BudgetController@index');
    //预算信息添加
    $router->get('/budget_prompt/create', 'BudgetController@edit');
    //修改预算信息
    $router->get('/budget_prompt/{id}/edit', 'BudgetController@edit');
    //添加、修改预算信息提交
    $router->post('/budget_prompt/save', 'BudgetController@editSubmit');
    //删除提示信息
   // $router->delete('/budget_prompt/del/{id}', 'BudgetController@delete')->name('budget_prompt.delete');
    $router->delete('/budget_prompt/{id}', 'BudgetController@del');

    //tips相关
    //列表
    $router->get('/tips', 'TipsController@index');
    //添加
    $router->get('/tips/create', 'TipsController@edit');
    //修改
    $router->get('/tips/{id}/edit', 'TipsController@edit');
    //添加、修改信息提交
    $router->post('/tips/save', 'TipsController@editSubmit');
    //删除提示信息
    $router->delete('/tips/{id}', 'TipsController@del');

    //广播相关
    //列表
    $router->get('/broadcast', 'BroadCastController@index');
    //添加
    $router->get('/broadcast/create', 'BroadCastController@edit');
    //修改
    $router->get('/broadcast/{id}/edit', 'BroadCastController@edit');
    //添加、修改信息提交
    $router->post('/broadcast/save', 'BroadCastController@editSubmit');
    //删除广播信息
    $router->delete('/broadcast/{id}', 'BroadCastController@del');
    //广播排序
    $router->post('/sort', 'BroadCastController@sort');

    // 装修日记
    // 列表
    $router->get('/decorationdiary/list', 'DecorationDiaryController@list');
    // 日记详情表
    $router->get('/decorationdiary/list/{taskListId}/{uid}', 'DecorationDiaryController@diaryList');
});
